package com.liujit.validator.constraints;

import com.liujit.validator.constraints.validate.IdCardValid;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author: liujun
 * @date: 2021/6/18 3:34 下午
 * @description: 身份证号
 */
@Documented
@Constraint(validatedBy = IdCardValid.class
)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface IdCard {

    String message() default "身份证号格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
